Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify the timezone in timestamps #1333

Merged
merged 1 commit into from
Jan 4, 2022
Merged

Specify the timezone in timestamps #1333

merged 1 commit into from
Jan 4, 2022

Conversation

evgeni
Copy link
Member

@evgeni evgeni commented Jan 3, 2022

fixes #1171

"""
return datetime.utcnow().isoformat()
return datetime.utcnow().strftime("%Y-%m-%d %H:%M:%S+00:00")
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

An alternative would be to use strftime("%Y-%m-%d %H:%M:%SZ"), where Z means Zulu aka UTC.

Ruby doesn't strictly care, and I must admit I find +00:00 better to read.

@evgeni
Copy link
Member Author

evgeni commented Jan 3, 2022

this replaces #1172

@evgeni
Copy link
Member Author

evgeni commented Jan 4, 2022

🤷‍♀️

@evgeni evgeni merged commit 82d2746 into theforeman:develop Jan 4, 2022
@evgeni evgeni deleted the utc branch January 4, 2022 08:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The reported facts and reports are ignoring machine timezone
3 participants